39 std::chrono::time_point<std::chrono::high_resolution_clock>
first_clock_;
40 std::chrono::time_point<std::chrono::high_resolution_clock>
start_clock_;
64 void printProfiling(
const std::string& _tabs, std::ostream& stream = std::cout)
const;
72 std::string
printDuration(
double _duration_microsec,
int precision = 2)
const;
Definition: profiling_unit.h:30
std::chrono::time_point< std::chrono::high_resolution_clock > start_clock_
Time point of the start clock.
Definition: profiling_unit.h:40
double desired_period_us_
Desired period in microseconds (< 0 for not specified)
Definition: profiling_unit.h:33
double getAvgDuration() const
Get the average duration.
Definition: profiling_unit.h:165
double getMaxDuration() const
Get the maximum duration.
Definition: profiling_unit.h:170
double getStDevDuration() const
Get the standard deviation of the duration.
Definition: profiling_unit.h:180
unsigned int getNCallbacks() const
Get the number of callbacks.
Definition: profiling_unit.h:140
unsigned int n_callbacks_
Number of callbacks.
Definition: profiling_unit.h:34
double getVarDuration() const
Get the variance of the duration.
Definition: profiling_unit.h:175
void setDesiredPeriod(double _desired_period_sec)
Set the desired period.
Definition: profiling_unit.h:150
double getAccDuration() const
Get the accumulated duration.
Definition: profiling_unit.h:160
std::chrono::microseconds max_duration_us_
Maximum duration in microseconds.
Definition: profiling_unit.h:37
ProfilingUnit(double desired_period_sec=-1)
Constructor.
Definition: profiling_unit.cpp:24
double var_duration_us_
Variance of the duration in microseconds squared.
Definition: profiling_unit.h:38
void startProfiling()
Start profiling.
Definition: profiling_unit.cpp:35
void printProfiling(const std::string &_tabs, std::ostream &stream=std::cout) const
Print profiling results.
Definition: profiling_unit.cpp:107
std::chrono::time_point< std::chrono::high_resolution_clock > first_clock_
Time point of the first clock.
Definition: profiling_unit.h:39
double getAveragePeriod() const
Get the average period.
Definition: profiling_unit.h:155
std::chrono::microseconds acc_duration_us_
Accumulated duration in microseconds.
Definition: profiling_unit.h:36
std::string printDuration(double _duration_microsec, int precision=2) const
Print provided duration (in us) in the most appropiate units with specified precision.
Definition: profiling_unit.cpp:80
void stopProfiling()
Stop profiling.
Definition: profiling_unit.cpp:44
double getDesiredPeriod() const
Get the desired period.
Definition: profiling_unit.h:145
bool running_
True if profiling is running.
Definition: profiling_unit.h:32
bool isRunning() const
Check if profiling is running.
Definition: profiling_unit.h:135
double average_period_us_
Average period in microseconds.
Definition: profiling_unit.h:35
Jet< T, N > sqrt(const Jet< T, N > &f)
Definition: jet.h:617
Definition: capture_base.h:23